<!--{include file='admin/public/header.html'}-->
<script>
function reply(pid){
	$('#parentid').attr('value',pid);
	$('.gbook_form').toggle();
}

$(function(){
	$("#form1").validationEngine();
});
</script>
<link href="view/admin/public/css/guestbook.css" rel="stylesheet" type="text/css" />
<div id="gbook_content"><!--留言列表Begin-->
    <div class="gbook_msg_list">
	     <div id ="msg_<!--{$data.id}-->" class="msg_bar">
		    <div class="gbook_usrname">
			&nbsp;<!--{$data.username}-->
			</div>
			<div class="msg_time"><!--{$data.createtime|date_format:'%Y-%m-%d %H:%M:%S'}--></div>
			<div class="clear"></div>
		 </div>

		 <div class="msg_content">
		   <strong>内容：</strong><br><!--{$data.content}-->
		   <a href="javascript:;" onclick="reply(<!--{$data.id}-->)" >回复</a>
		 </div>
		<!--{foreach from=$data.replys key=k item=v}-->
		 <div class="reply_content">
		 <div class="gbook_usrname">
			&nbsp;<!--{$v.username}-->
			</div>
		 &nbsp;<span class="gbook_answer">回复内容:</span><br />&nbsp;&nbsp;<!--{$v.content}-->
		 </div>
		<div class="clear"></div>
		<!--{/foreach}-->
	 </div>
 <!--留言列表End--><!--留言表单Begin-->
  <div class="gbook_form">
    <table width="98%" cellspacing="1" cellpadding="0" border="0" bgcolor="#A09F9C" align="center" style="margin-top: 10px; margin-bottom: 10px;">
         <tr>
          <td height="25" bgcolor="#A09F9C" align="left">&nbsp; <strong>我 要 留 言</strong></td>
        </tr>
        <tr>
          <td height="200" valign="top">
           <form id="form1" action="" method="post">
            <table width="98%" cellspacing="0" cellpadding="0" border="0" align="center">
            	<tr>
            	 <td valign="middle">昵称： </td>
            	 <td width="484" align="left">
            	 <input type="text" class="span4  validate[required]" name="username" size="30" /></td>
            	</tr>
                <tr>
                  <td valign="middle">留言内容：</td>
                  <td ><textarea name="content" class="span9 validate[required]" cols="50" rows="5"></textarea></td>
                </tr>
                <tr>
                  <td height="30" align="center" colspan="4">
                  <input type="hidden" id="parentid" name="parentid" value=""/>
                  <input type="submit" value="提 交" class="btn btn-primary btn-small input-small" /></td>
                </tr>
            </table>
          </form>
          </td>
        </tr>
    </table>
    </div>
    <!--留言表单End-->
    <div class="clear"></div>
    </div>
<!--{include file='admin/public/footer.html'}-->